<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>date</title>
	</head>
	<body>
		<div id="div1"></div>
		<script type="text/javascript">
			var endTime = new Date();
			endTime.setFullYear(2025,4,9);
			endTime.setHours(8,45,0);
			var timer = setInterval(fun1,1000);
			function fun1 () {
				var currenTime = new Date();
				if (currenTime > endTime) {
					div1.innerHTML = "倒计时结束";
				} else{
					var distance = endTime - currenTime;
					var days = Math.floor(distance/1000/60/60/24);
					var hours = Math.floor((distance/1000/60/60)%24);
					var minutes = Math.floor((distance/1000/60)%60);
					var seconds = Math.floor((distance/1000)%60);
					div1.innerHTML = `距离倒计时还有${days}天${hours}小时${minutes}分钟${seconds}秒下课！！`;
				}
			}
		</script>
	</body>
</html>